<!DOCTYPE html>
<html>
 <head> 
  <meta charset="UTF-8" /> 
  <title>kafka监控</title> 
  <link rel="stylesheet" href="../../assets/js/layui/css/layui.css" media="all" />
  <link rel="stylesheet" href="../../assets/css/global.css" media="all">
  <link rel="stylesheet" href="../../assets/js/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="../../assets/css/table.css" />
 </head> 
 <body> 
  <div class="admin-main"> 
   <form action="" class="layui-form" method="post">  
    <div class="layui-inline"> 
     <select id="group_select" name="group" asnycSelect="/api/kafka/groups" lay-filter="group_select"> <option value="">请选择group</option> </select> 
    </div> 
    <div class="layui-inline"> 
     <input type="button" class="layui-btn J_search" lay-submit="" lay-filter="search" value="查询" /> 
    </div> 
   </form> 
   <fieldset class="layui-elem-field"> 
    <legend>服务器节点列表</legend> 
    <div class="layui-field-box"> 
     <table class="layui-table admin-table"> 
      <thead> 
       <tr> 
        <th width="25%">id</th> 
        <th width="25%">host</th> 
        <th width="25%">port</th> 
        <th width="25%">version</th> 
       </tr> 
      </thead> 
      <tbody id="broker_content" dataLoad="/api/kafka/brokers" template-id="broker_list_tpl"></tbody> 
     </table> 
    </div> 
   </fieldset> 
   
   <fieldset id="producer_set" class="layui-elem-field" style="display: none;"> 
    <legend>Producer Topic</legend> 
    <div class="layui-field-box layui-form"> 
     <table class="layui-table admin-table"> 
      <thead> 
       <tr> 
        <th width="100">group</th> 
        <th width="100">topic</th> 
        <th width="100">total suc</th> 
        <th width="80">total err</th> 
        <th width="100">latest suc</th> 
        <th width="80">latest err</th> 
        <th width="*">lastNode</th> 
        <th width="100">lastTime</th> 
       </tr> 
      </thead> 
      <tbody id="pd_topic_list"></tbody> 
     </table> 
    </div> 
   </fieldset> 
   
   <fieldset id="consumer_set" class="layui-elem-field" style="display: none;"> 
    <legend>Consumer Topic</legend> 
    <div class="layui-field-box layui-form"> 
     <table class="layui-table admin-table"> 
      <thead> 
       <tr> 
        <th width="130">topicName</th> 
        <th width="50">part</th> 
        <th width="80">logSize</th> 
        <th width="75">offset</th> 
        <th width="55">lat</th> 
        <th width="*">owner</th> 
        <th width="150">createTime</th> 
        <th width="100">lastTime</th> 
       </tr> 
      </thead> 
      <tbody id="cs_topic_list"></tbody> 
     </table> 
    </div> 
   </fieldset> 
  </div> 
  <!--模板--> 
  <script type="text/html" id="broker_list_tpl">
    {{# layui.each(d, function(index, item){ }}
       <tr>
		  <td>{{ item.id }}</td>
          <td>{{ item.host }}</td>
          <td>{{ item.port }}</td>
          <td>{{ item.version }}</td>
       </tr>
    {{# }); }}
  </script> 
 </body>
 <script type="text/javascript" src="../../assets/js/layui/layui.js"></script>
<script>
	layui.cache.page = 'module';
	layui.config({
		version : "1.0.0",
		base : '../../assets/js/modules/'
	}).use('kafka');
</script>
</html>